Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a storage medium for determining the sequence of a plurality of images.
Description of the Related Art
There is a conventional technology that is applicable to image reading apparatuses equipped with an automatic document feeding mechanism for one-sided reading. In this technology, first an image reading apparatus sequentially reads the front sides of a plurality of document sheets, and then the back sides of the plurality of document sheets. Following this, the image reading apparatus determines the page sequence of the images acquired through the above reading operation.
In a case where data for an odd number of pages is printed on both sides of document sheets, for example, the back side of the last document sheet is blank. Accordingly, when an image reading apparatus reads the back sides of the document sheets after reading the front sides, there are cases where a user removes the last document and then places only the remaining document sheets on the automatic document feeder (ADF). In this case, the resultant images of the back sides are fewer than the images of the front sides.
Japanese Patent Application Laid-Open No. 2001-320513 discusses a technology in which the number of front-side images is compared to the number of back-side images and in a case where both numbers do not match each other, a predetermined sequence is determined for the images.
Various factors, however, would be responsible for a mismatch between the numbers of front and back-side images. During the operation of reading the back sides, for example, a read error may occur or a user may remove the last document sheet or give a cancel instruction. If such a factor in interrupting an operation of reading the back sides arises, the number of resultant back-side images is smaller than the number of the front-side images. The above technology discussed in Japanese Patent Application Laid-Open No. 2001-320513 fails to consider a situation in which an operation of reading back sides is interrupted. Thus, the technology determines the sequence of the read front and back-side images, independently of whether a cancel instruction has been given.